Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitbook-plugin-prism

Package Overview
Dependencies
Maintainers
3
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitbook-plugin-prism

Prism highlighting for gitbook

  • 2.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
646
decreased by-7.45%
Maintainers
3
Weekly downloads
 
Created
Source

Gitbook Plugin for Prism

NPM

Before
After

Usage

Add the plugin to your book.json, and disable default GitBook code highlighting:

{
  "plugins": ["prism", "-highlight"]
}

Options

css

Override default styles. All css files must reside in the same folder.

"pluginsConfig": {
  "prism": {
    "css": [
      "prismjs/themes/prism-solarizedlight.css"
    ]
  }
}

lang

Support non-standard syntax prefixes by aliasing existing prefixes.

"pluginsConfig": {
  "prism": {
    "lang": {
      "flow": "typescript"
    }
  }
}

ignore

Due to other plugins using code block notion to denote other functionality, you can ignore certain langs

"pluginsConfig": {
  "prism": {
    "ignore": [
      "mermaid",
      "eval-js"
    ]
  }
}

Prism Themes

https://github.com/PrismJS/prism

Okaidia prismjs/themes/prism-okaidia.css

Okaidia

Solarized Light prismjs/themes/prism-solarizedlight.css

Solarized Light

Tomorrow prismjs/themes/prism-tomorrow.css

Tomorrow

Dark prismjs/themes/prism-dark.css

Dark

Coy prismjs/themes/prism-coy.css

Coy

Atelierbram Themes

https://github.com/atelierbram/syntax-highlighting

Base16 Ocean Dark syntax-highlighting/assets/css/prism/prism-base16-ocean.dark.css

Base16 Ocean Dark

Google Light syntax-highlighting/assets/css/prism/prism-base16-google.light.css

Google Light

Xonokai syntax-highlighting/assets/css/prism/prism-xonokai.css

Google Light

Credits

Originally based on https://github.com/spricity/google_code_prettify.

License

Apache 2

FAQs

Package last updated on 26 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc